package com.wjy.common.mq.pc;

import com.wjy.common.util.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class Poper {

    @Autowired
    private RedisUtil redisUtil;

    public String pop(int timeout, String... keys) {
        List<String> list = redisUtil.brpop(timeout, keys);
        return list.get(1);
    }

}
